﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq;
using System.Data;

namespace TheardLearnWeb
{
    public partial class ListBoxTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ListBoxBand();
                list_Client.Attributes.Add("onDblClick", "leftchange()");//双击事件
                list_Client2.Attributes.Add("onDblClick", "rightchange()");

                //list_Client.Attributes.Add("onClick", "change()");//单击事件

                string str = string.Empty;
                
            }
        }

        public void ListBoxBand()
        {
            ListItem item1 = new ListItem("C#", "C#");
            ListItem item2 = new ListItem("java", "java");
            this.list_Client.Items.Add(item1);
            this.list_Client.Items.Add(item2);
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            int count = this.list_Client2.Items.Count;
           
            string value = this.hidcontent.Value;
        }

    }
}